<template>
    <el-tabs v-model="activeName" class="demo-tabs" @tab-change="change">
        <el-tab-pane label="20W" name="20W">
            <WeekStock20WSta v-if="activeName === '20W'"></WeekStock20WSta>
        </el-tab-pane>
        <el-tab-pane label="30W" name="30W">
            <WeekStock30WSta v-if="activeName === '30W'"></WeekStock30WSta>
        </el-tab-pane>
        <el-tab-pane label="60W" name="60W">
            <WeekStockYearLineHistory v-if="activeName === '60W'"></WeekStockYearLineHistory>
        </el-tab-pane>
    </el-tabs>
</template>

<script setup>
import { ref } from 'vue'

import WeekStock30WSta from './WeekStock30WSta.vue';
import WeekStockYearLineHistory from '../WeekStockYearLineHistory.vue';
import WeekStock20WSta from './WeekStock20WSta.vue';

const activeNameKey = "WeekStockGBStatActiveName"
const activeName = ref(sessionStorage.getItem(activeNameKey) || '60W')
const change = (tabName) => {
    sessionStorage.setItem(activeNameKey, tabName)
}
</script>